<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <button id="add" @click="add">+</button>
        {{num[0]}}
    </div>
    <script>
        const app=new Vue({
            el:"#app",
            data:{
                num:[0,1]
            },
        methods:{
            add:function(){
                let n=this.num[0]
                this.num.splice(0,0,n+1)
            }
        }
        })
    </script>
</body>
</html>